package com.welab.pandahelper.http;

import android.app.ProgressDialog;
import android.content.Context;

public abstract class SpotsCallBack<T> extends IBaseCallBack<T> {

    ProgressDialog mDialog;

    public SpotsCallBack(Context context) {
        mDialog = new ProgressDialog(context);
        mDialog.setCancelable(false);
        mDialog.setCanceledOnTouchOutside(false);
    }

    public void showDialog() {
        mDialog.show();
    }

    public void dismissDialog() {
        mDialog.dismiss();
    }

    @Override
    public void onRequestBefore() {
        showDialog();
    }
}